package cz.muni.fi.pv168.reminder.managers;

import cz.muni.fi.pv168.reminder.ServiceFailureException;
import cz.muni.fi.pv168.reminder.entities.Worker;
import java.sql.SQLException;
import java.util.List;
import javax.sql.DataSource;

/**
 *
 * @author Adic
 */
public interface WorkerManager {

    /**
     *
     * @param person
     * @return
     */
    public void createPerson(Worker person) throws ServiceFailureException;

    /**
     *
     * @param person
     */
    public void updatePerson(Worker person)  throws ServiceFailureException ;

    /**
     *
     * @param person
     */
    public void deletePerson(Worker person) throws SQLException, ServiceFailureException;

    /**
     *
     * @return
     */
    public List<Worker> findAllPersons() throws ServiceFailureException;

    /**
     *
     * @param id
     * @return
     */
    public Worker findPersonById(Long id)throws ServiceFailureException;
    
    void setDataSource(DataSource ds);
}
